
<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>

<script type="text/javascript">

var CheckObject = function () {};
CheckObject.prototype = {

	checkName : function() {
		console.error('验证姓名');
		return this;
	},
	checkEmail : function() {
		console.error('验证邮件');
		return this;
	},
	checkPassword : function() {
		console.error('验证密码');
		return this;
	}
}

var a = new CheckObject();
a.checkName().checkEmail().checkPassword();
console.error('---------------');
//下面这里this是a的__proto__所以后面会出错
console.error(a.__proto__.checkName().checkEmail().__proto__.checkPassword());


</script>

</body>
</html>